import request from '@/utils/axios'

// 报表统计

//运营关键数据
//关键指标
export function getOperaKpi(data) {
    return request({
        url: "/v1/admin/statistic/operating/kpi",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//数据明细
export function getOperaSummaryList(data) {
    return request({
        url: "/v1/admin/statistic/operating/summaryList",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//数据明细导出
export function exportOperaSummaryList(data) {
    return request({
        url: "/v1/admin/statistic/operating/exportSummaryList",
        method: 'post',
        data: JSON.stringify(data)
    });
}

// -----------------------------分割线------------------------------

//聊天日志
//列表
export function getChatLog(data) {
    return request({
        url: "/v1/admin/statistic/chat/sessionList",
        method: 'post',
        data: JSON.stringify(data)
    });
}

export function getMessageHistoryById(data) {
    return request({
        url: "/v1/admin/message/getMessageHistoryById",
        method: 'post',
        data: JSON.stringify(data)
    });
}

export function exportSessionList(data) {
    return request({
        url: "/v1/admin/statistic/chat/exportSessionList",
        method: 'post',
        data: JSON.stringify(data)
    });
}

// -----------------------------分割线------------------------------

//来访数据统计
export function getVisitData(data) {
    return request({
        url: "/v1/admin/statistic/visit",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//来访区域、渠道统计-导出
export function exportVisit(url, data) {
    return request({
        url: url,
        method: 'post',
        data: JSON.stringify(data)
    });
}


// -----------------------------分割线------------------------------

//知识库数据统计
//概要
export function knowledgeSummary(data) {
    return request({
        url: "/v1/admin/statistic/knowledge/summary",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//知识类型占比
export function knowledgeRation(data) {
    return request({
        url: "/v1/admin/statistic/knowledge/knowledgeRation",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//知识类型占比-导出
export function exportKnowledgeRatio() {
    return request({
        url: "/v1/admin/statistic/knowledge/exportKnowledgeRatio",
        method: 'post',
        data: JSON.stringify({})
    });
}

//知识配置情况分析
export function knowledgeAnalysis(data) {
    return request({
        url: "/v1/admin/statistic/knowledge/analysis",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//知识配置异常检测
export function abnormalDetect(data) {
    return request({
        url: "/v1/admin/statistic/knowledge/abnormalDetect",
        method: 'post',
        data: JSON.stringify(data)
    });
}

// -----------------------------分割线------------------------------

//热点问题统计
export function hotQuestion(data) {
    return request({
        url: "/v1/admin/statistic/hotQuestion",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//热点问题统计-导出
export function exportHotQuestion(url, data) {
    return request({
        url: url,
        method: 'post',
        data: JSON.stringify(data)
    });
}

// -----------------------------分割线------------------------------

//问题数据统计
//问题类型匹配率
export function queReplyType(data) {
    return request({
        url: "/v1/admin/statistic/question/replyType",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//未知问题统计
export function queUnknown(data) {
    return request({
        url: "/v1/admin/statistic/question/unknown",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//未知问题数据趋势
export function queUnknownTrend(data) {
    return request({
        url: "/v1/admin/statistic/question/unknownTrend",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//问题数据统计-导出
export function exportQueData(url, data) {
    return request({
        url: url,
        method: 'post',
        data: JSON.stringify(data)
    });
}

// -----------------------------分割线------------------------------

//满意度统计
//满意趋势图
export function satisfyTrend(data) {
    return request({
        url: "/v1/admin/statistic/satisfaction/trend",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//知识点满意度明细
export function questionDetailList(data) {
    return request({
        url: "/v1/admin/statistic/satisfaction/questionDetailList",
        method: 'post',
        data: JSON.stringify(data)
    });
}

//满意度-导出
export function exportSatisfy(url, data) {
    return request({
        url: url,
        method: 'post',
        data: JSON.stringify(data)
    });
}

// -----------------------------分割线------------------------------